home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2784 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.8 KB

  1. Path: Hermes.grace.irl.cri.nz!maths!peterm
  2. From: peterm@maths.grace.cri.nz (Peter McGavin)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Demo/game to OS friendly part II
  5. Date: 05 Feb 1996 00:19:10 GMT
  6. Organization: Industrial Research Ltd
  7. Message-ID: <PETERM.96Feb5131910@tui.maths.irl.cri.nz>
  8. References: <john.hendrikx.47u5@grafix.xs4all.nl>
  9.     <PETERM.96Jan29164036@tui.maths.irl.cri.nz>
  10.     <4ek6bo$84n@xmission.xmission.com> <4ekl5d$51@serpens.rhein.de>
  11.     <PETERM.96Feb1123338@tui.maths.irl.cri.nz>
  12.     <4ep546$hpr@serpens.rhein.de>
  13.     <PETERM.96Feb1205215@tui.maths.irl.cri.nz>
  14.     <4eq5s3$mnn@serpens.rhein.de>
  15. NNTP-Posting-Host: tui.grace.cri.nz
  16. In-reply-to: mlelstv@serpens.rhein.de's message of 1 Feb 1996 11:49:39 +0100
  17.  
  18. mlelstv@serpens.rhein.de (Michael van Elst) writes:
  19. >peterm@maths.grace.cri.nz (Peter McGavin) writes:
  20. >>mlelstv@serpens.rhein.de (Michael van Elst) writes:
  21. >>>peterm@maths.grace.cri.nz (Peter McGavin) writes:
  22. >>>>Current high-level gfx calls have a queue limit of 1 (or less than 1).
  23. >>>Right. But that's as good as N.
  24. >>I assume you mean by creating another task to process the queue.
  25. >No, I mean for the interface. A caller now cannot rely on the operation
  26. >being completed which means that you could extend the queue to any
  27. >depth.
  28.  
  29. Ah, I thought you were talking about the current implementation.  Part
  30. of my original proposal is that some future implementation of the OS
  31. should maintain a longer queue.  I never proposed breaking apps using
  32. the current interface.  Only the internal implementation would change.
  33. (OK, apps that sync with WaitBlit() could be problematic.)
  34.  
  35. >>There is a problem with the current implementation that WaitBlit() is
  36. >>CPU-intensive for large blits.
  37. >
  38. >Yes.
  39. >
  40. >>So queuing large gfx operations
  41. >>(perhaps with some smaller operations in the queue as well) eats CPU
  42. >>time.
  43. >
  44. >No, because you usually do not need to call WaitBlit() explicitely.
  45. >The graphics functions do. And if these were using a real queue they
  46. >could Wait() for a signal from the queuer.
  47.  
  48. Again, I was still talking about the current implementation, for which
  49. the problem still exists.  I agree that implementing a queue and an
  50. alternative wait mechanism would fix it.
  51.  
  52. >>Also, there may be problems queuing some operations like
  53. >>ChangeScreenBuffer() when the Screen is opened by the parent task (or
  54. >>perhaps not --- I don't really know).
  55. >
  56. >This function would need to take care of queued operations. Right.
  57.  
  58. I wasn't sure about sharing a Screen and other gfx structures between
  59. tasks in the current implementation (i.e, if the user's app starts
  60. another task to process the queue).
  61.  
  62. >If you queue an operation and rely on the results you have to
  63. >synchronize with the rendering. Just waiting "for the blitter" works
  64. >if the blitter is the only hardware that you could wait for. For other
  65. >hardware a WaitBlit() would have to synchronize with that
  66. >hardware. And that is a big waste and WaitBlit() becomes slow
  67. >too. What I propose is a WaitBitMap() that stops your task until all
  68. >rendering done to that bitmap had been completed. After all you are
  69. >not interested into other BitMaps when you want to examine the result
  70. >(or free the BitMap). You would also need a lower-level function that
  71. >gives you a message port or signal bit so that you can Wait() for it
  72. >concurrently with other events.
  73.  
  74. I agree those are good ideas.
  75.  
  76. Now, isn't a queue of gfx-operations simply a queue of messages (or
  77. packets)?  Wouldn't a straightforward implementation be that a
  78. high-level gfx function sends a message to some handler task for the
  79. bitmap?  Except some gfx calls would only construct a portion of a
  80. message as a form of buffering, or simply return a status or
  81. something.  Or do you propose hanging everything off interrupts, like
  82. QBlit() (which would get messy IMO)?  In the former case, haven't we
  83. come full circle?
  84. -- 
  85. Peter McGavin.   (p.mcgavin@irl.cri.nz)
  86.